import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:flutter_cate/core/model/meal_model.dart';
import 'package:flutter_cate/ui/pages/detail/detail_content.dart';
import 'package:flutter_cate/core/viewmodel/favor_view_model.dart';
import 'package:flutter_cate/ui/pages/detail/detail_floating_button.dart';


class AMDetailScreen extends StatelessWidget {

  static const String routeName = "/detail";

  @override
  Widget build(BuildContext context) {
    // 获取 push 传过来的数据模型
    final meal = ModalRoute.of(context).settings.arguments as AMMealModel;
    return Scaffold(
      appBar: AppBar(
        title: Text(meal.title),
      ),
      body: AMDetailContent(meal),
      floatingActionButton: AMDetailFloatingButton(meal),
    );
  }
}
